<html>

<head>
<title>Update</title>
<link type="text/css" href="jquery-ui-1.8.14.custom/css/ui-lightness/jquery-ui-1.8.14.custom.css" rel="Stylesheet" />	
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
</head>
<body>
<script language="javascript">
function fncSubmit()
{
if(document.form1.opera_id.value == "")
	{
	alert('Please input OPERATIONS ID');
		document.form1.opera_id.focus();
		return false;
	}
if(document.form1.id.value == "")
	{
	alert('Please input PATIENTS ID');
		document.form1.id.focus();
		return false;
	}
if(document.form1.sur.value == "")
	{
	alert('Please input SURGEON ID');
		document.form1.sur.focus();
		return false;
	}       
if(document.form1.nur.value == "")
	{
	alert('Please input NURSE ID');
		document.form1.nur.focus();
		return false;
	} 
if(document.form1.ane.value == "")
	{
	alert('Please input ANESTHESIST ID');
		document.form1.ane.focus();
		return false;
	}
if(document.form1.charges.value == "")
	{
	alert('Please input CHARGES');
		document.form1.charges.focus();
		return false;
	}
if(document.form1.op_room.value == "")
	{
	alert('Please input OPERATE_ROOM');
		document.form1.op_room.focus();
		return false;
	}
if(document.form1.pa_room.value == "")
	{
	alert('Please input PATIENT_ROOM');
		document.form1.pa_room.focus();
		return false;
	}
if(document.form1.hr.value == "")
	{
	alert('Please input HOUR');
		document.form1.hr.focus();
		return false;
	}
        document.form1.submit();
}
</script>
<br/>
<br/>
<center><h1>Update MEDICATIONS</h1></center>
<br/>
<center><table border=3 bordercolor="#ff99cc">
<tr><td>

<?
	$conn = oci_connect("hospital", "hospital", "//localhost/XE"); 
	$call = "select * from OPERATION where opera_id = '".$_GET["ids"]."' ";
	$col = $_GET["ids"];
	$pull = oci_parse($conn,$call);
	oci_execute($pull,OCI_DEFAULT);
	$total = oci_fetch_array($pull);
?>
<form action="edit-medications.php?col=+<?echo $col?>" method="post" name="form1" onSubmit="JavaScript:return fncSubmit();">
        OPERATIONS ID: <input type="text" name="opera_id" value = "<?=$total["OPERA_ID"];?>"/><br/>
        PATIENTS ID: CHARGES: <input type="text" name="id" value = "<?=$total["ID"];?>" /><br/>
        SURGEON ID: <input type="text" name="sur" value = "<?=$total["SURGEON_ID"];?>"/><br/>
        NURSE ID: <input type="text" name="nur" value = "<?=$total["NURSE_ID"];?>" /><br/>
        ANESTHESIST ID: <input type="text" name="ane" value = "<?=$total["ANESTHESIST_ID"];?>"/><br/>
	CHARGES: <input type="text" name="charges" value = "<?=$total["CHARGES"];?>"/><br/>
        OPERATE_ROOM: <input type="text" name="op_room" value = "<?=$total["OPERATE_ROOM"];?>"/><br/>
        PATIENT_ROOM: <input type="text" name="pa_room" value = "<?=$total["PATIENT_ROOM"];?>"/><br/>
        Hour: <input type="text" name="hr" value = "<?=$total["HOUR"];?>"/><br/>
	<center><input type="submit" /></center>
	
</form>

</td></tr>
</table>


</body>
</html>